﻿using AWSTool.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Mvc;

namespace AWSTool.Controllers
{
    [System.Web.Http.Authorize]
    public class AWSController : ApiController
    {
        private AWSToolDbContext Db = new AWSToolDbContext();
        // GET api/aws
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/aws/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/aws
        public void Post([FromBody]string value)
        {            
            var network = new Network();
            Db.Networks.Add(network);
            Db.SaveChanges();
        }

        // PUT api/aws/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/aws/5
        public void Delete(int id)
        {
        }
    }
}
